<@html.doctype />
<html>
<@html.head>
	<link rel="stylesheet" type="text/css" href="../includes/styles/skins/Green/component/css/text_cut.css" />
	<link rel="stylesheet" type="text/css" href="../includes/styles/skins/Green/layout/css/layout_news.css" />
<!---->    <link rel="stylesheet" type="text/css" href="../includes/styles/skins/Green/layout/css/nth_essay.css">
	<script type="text/javascript" src="../includes/js/jsLayout/tishi.js"></script>
	
    <script type="text/javascript">
        $(function(){
            $("#pub_submit").click(function(){
            
                var pubUName = document.getElementById("pubUName").value;
                if (pubUName == "false") {
                    $("#tip1").html("请先登录");
                    return false;
                }
                var articleTitle = document.getElementById("articleTitle").value;
                var articleContent = document.getElementById("articleContent").value;
                if (articleTitle != "" && articleTitle != null && articleContent != "" && articleContent != null)
				{
                    return true;
                }
                else {
                    alert("文章标题或者文章内容不能为空");
                    return false;
                }
            })
        })
    </script>

</@html.head>
<body>

<@html.header>
	<!--请不要在此处添加内容-->
</@html.header>

<@html.content>
	<!--请在此处添加页面内容-->
	<!--用于发布文章-->
    <div id="content">
        <div id="news_left_content">
            <h2>发布新文章</h2>
            <form action="${base}/hatchnav/pubarticle.action">
                <div id="essay_title">
                    <input type="text" name="articleTitle" id="articleTitle" class="title" size="110" placeholder="输入文章标题">
                </div>
                <div id="essay_content">
                    <div>
                        <img src="../includes/styles/skins/Green/layout/images/essay_title.jpg" style="border-left:1px solid #cbcbc9;">
                    </div>
                    <div style="margin-top:-3px;">
                        <textarea name="articleContent" id="articleContent" style="width:696px;height:400px;" >
                        </textarea>
                    </div>
                </div>
                <div id="classify">
                    <label class="label">
                        日志分类:
                    </label>
                    <select name="artTypeID"id="categoryId" class="select">
                    	<#list articleTypeList as articleType>
						<option value="${articleType.artTypeID}">${articleType.artTypeName}</option>
						</#list>
                    </select>
                </div>
                <div id="classify">
                    <label class="label">
                        文章主题:
                    </label>
                    <select name="artTopicID"id="categoryId" class="select">
                    	<#list articleTopicList as articleTopic>
                        <option value="${articleTopic.artTopicID}">${articleTopic.artTopicName}</option>
						</#list>
                    </select>
                </div>
                <div id="button">
                    <input type="submit" class="submit" id="pub_submit" value="发布">
					<input type="submit" class="submit" value="取消">
					<input type="file" id="insertfile" value="选择文件" />
					<font class="tip"><span id="tip1"></font>
					<!--判断用户是否登录，若未登录则显示登录按钮，连接到登录界面进行登录-->
					<#if userName?exists>
					<input name="pubUName" type="hidden"  id="pubUName" value="true"/> 
					<#else >
					<input name="pubUName" type="hidden"  id="pubUName" value="false" />
					</#if>
					
                </div>
            </form>
        </div>
        <div id="news_right_content">
            <div id="news_search">
                <form action="1.php" id="news_form">
                    <input type="text" name="search" id="search_1" placeholder="搜索新闻"><input type="submit" name value=" " id="search_2">
                </form>
            </div>
            <div id="news_tags">
                <div id="tags_title">
                    <p>热门文章</p>
                </div>
                <div id="tags_con">
                    <ul class="tishi">
                        <#list articleTopList as article>
                        <li><a href="${base}/hatchnav/showarticledetail.action?articleID=${article.articleID}" title="header=[Top5文章] body=[文章标题：${article.articleTitle}<br>访问量：${article.visitNum}<br>发布时间：${article.pubTime}<br><br>]">${article.articleTitle}</a></li>
                        </#list>
                    </ul>
                </div>
            </div>
            <div id="news_cat">
                <div id="cat_title">
                    <p>功能分类</p>
                </div>
                <div id="cat_con">
                    <ul>
                    	<li><a href="${base}/hatchnav/topubarticle.action">发布文章 +</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</@html.content>

<@html.bottom>
	<!--请不要在此处添加内容-->
</@html.bottom>

</body>
</html>